import Modal from './index.vue'

export default function install(Vue) {
    Vue.prototype.$modal = function (options) {
        Modal.components.Custom = options.template;
        // 需要在实例化之前 对components进行定义
        const Ctor = Vue.extend(Modal);
        const instance = new Ctor({
            propsData: options
        })
        instance.$mount(document.createElement('div'));
    }
}